#ifndef BUILDING_H
#define BUILDING_H

#include <QPushButton>
#include <QLabel>
#include "Unit.h"
#include "Command.h"

class Building: public QObject{

    private: Q_OBJECT

    public:
        explicit Building(QPixmap* imgOn, QPixmap* imgOff, QString nm, QString setDesc, bool red, int slot, void* eng, Ui::MainClass* u);
        ~Building();

        void addCmd(QIcon* imgOn, QIcon* imgOff, QString name, QString desc, QString type, bool red);
        void select();
        void deselect();

        int getLevel();
        QString getName();

        void setHitpoints(int val);
        QPushButton* getDiplayButton();
        void displayCommands();
        void hideCommands();

    public slots:
        void promote();

    protected:
        QString name;
        int level;
        int hitpoints;
        bool isSelected;
        bool isRed;

        //Graphics
        QPushButton* displayButton;
        QLabel* displayLabel;
        QPixmap* imageOn;
        QPixmap* imageOff;
        QString description;
        QString buildingName;

        QList <Command*>* cmdList;

        void* engine; //BattleEngine responsible for this building
        Ui::MainClass *ui;
        QTimer* commandTimer;


};

#endif // BUILDING_H
